package de.mizi.tilemap.object;

import de.mizi.interfaces.Locatable;

/**
 * Represents a TilemapObject that knows its position.
 * @author mizi
 *
 */
public class LocatableTilemapObject extends TilemapObject implements Locatable {
	protected int x;
	protected int y;
	
	/**
	 * Constructs a new LocatableTilemapObject with the given draw data.
	 * @param drawData the data that is used to draw this object
	 * @param description the description of this object
	 */
	public LocatableTilemapObject(TilemapObjectDrawData drawData, String description) {
		this(0, 0, drawData, description);
	}
	
	/**
	 * Constructs a new LocatableTilemapObject at the given position and with
	 * the given draw data.
	 * @param x the x position
	 * @param y the y position
	 * @param drawData the data that is used to draw this object
	 * @param description the description of this object
	 */
	public LocatableTilemapObject(int x, int y, TilemapObjectDrawData drawData, String description) {
		super(drawData, description);
		this.x = x;
		this.y = y;
	}
	
	@Override
	public int getX() {
		return x;
	}
	
	@Override
	public void setX(int x) {
		this.x = x;
	}
	
	@Override
	public int getY() {
		return y;
	}
	
	@Override
	public void setY(int y) {
		this.y = y;
	}
}
